package com.jiazhong.shixi.mapper;


import com.jiazhong.shixi.bean.Bingli;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BingliMapper {

    //病历注册
    @Select("insert into bingli values (#{bingliXingming},#{bingliXingbie},#{bingliShenfenzheng},#{bingliNianling},#{bingliShoujihao},#{bingliZhengzhuang},#{bingliZhengduanjieguo},now(),#{yisId})")
    Bingli add(Bingli bingli) ;
    //病历模糊查询
    @Select(" select * from bingli where bingliZhengzhuang like #{bingliZhengzhuang}")
    List<Bingli> mohu(String bingliZhengzhuang);
    //最新病历
    @Select("select * from bingli  order by bingliShijian desc")
    List<Bingli> zuixin();
}
